import { createSlice } from '@reduxjs/toolkit'

export const addSlice = createSlice({
    initialState: {
        value: 'Hi reduxjs toolkit',
    },
    name: 'add',
    reducers: {
        change(state, action) {
            state.value = action.payload
        },
        reset(state) {
            state.value = ''
        }
    }
})
